package net.towee.model.account;

import java.util.List;

import net.towee.model.group.GroupIdentity;

import com.google.gwt.user.client.rpc.IsSerializable;


/**
 * AccountGroup container for user account. Provide methods to
 * include/exclude AccountGroups
 * @author c58
 */
public interface AccountGroupsContainer extends IsSerializable  {
	/**
	 * @param groupIds
	 * @return true if user is in each group of set
	 */
	boolean isInGroups(String... groupIds);
	
	/**
	 * @param groupId
	 * @return AccountGroup data or null if user not in group
	 */
	AccountGroup getAccountGroup(String groupId);
	
	/**
	 * Enter user to group with some role
	 * @param goupId
	 * @param role
	 * @return TODO
	 */
	AccountGroup enterToGroup(GroupIdentity goupId, Role role);
	
	/**
	 * Delete user from group
	 * @param groupId
	 */
	void removeFromGroup(String groupId);
	
	/**
	 * @return iterable object of all account groups
	 */
	List<AccountGroup> getGroupsList();
}
